<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>新增产线</title>
		<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/form.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/list.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.css" />
		<link rel="stylesheet" type="text/css" href="../../js/layui-add-tree/css/layui-add-tree.css"/>
	</head>
	<body>
		  <!-- 蓝色背景区域 -->
    <div class="wrap">
        <!-- 白色可用区域 -->
        <div class="canuse">
            <!------ 位置 ------>
            <p class="contentText local">
                <span>位置：生产工单管理>生产计划管理 > 新增生产计划</span>
            </p>
            <h4 class="sel_title">
                <img src='../../img/list/brand1.png' /><span>填充信息</span><span class="necessary">（带*号为必填项）</span>
            </h4>
            <div class="write_area">
                <form method='post' id="formArea">
                    <table class="contentText" id="formTable">
                        <tr>
                            <th>生产批次号:</th>
                            <td><input value='' name="planCode" /> <input type='hidden'
                                name="id" value='${productPlan.id}' /> <input type='hidden' name="type" value=1 /><span
                                style='color: red;'>*</span></td>
                            <th>计划类型:</th>
                            <td>
               					 <select id = "orderSelect">
					    		    <option value = "全部">临时计划</option>
	                            	<option value="未排产">月度计划</option>
	                            	<!--<option value="生产中">未发布</option>
	                            	<option value="已完工">暂停</option>-->
               					 </select>	
                            <span style='color: red;'>*</span></td>
                            <th>计划数量:</th>
                            <td><input id="planAmount" name="planAmount" readonly value="" /></td>
                        </tr>
                          <tr>
                            <th>计划号:</th>
                            <td><input name="planStartTime" value=""
                                readonly="readonly" /><span style='color: red;'>*</span></td>
                            <th>零部件代号:</th>
                            <td><input name="planStartTime" value=""
                                readonly="readonly" /><span style='color: red;'>*</span></td>
                            <th>产品编号:</th>
                            <td><input name="planEndTime" value="" readonly="readonly" /><span
                                style='color: red;'>*</span></td>
                          </tr>
                        <tr>
                            <th>计划开工时间:</th>
                            <td>
                            	<input type="text" name="" id="dateControl" readonly="readonly" /> <span class="redColor">*</span>
                         </td>
                            <th>计划完工时间:</th>
                        	    <td><input type="text" name="" id="dateControl1" readonly="readonly" /><span class="redColor">*</span>
                      		 <th>承制班组:</th>
                       		  <td>
                            	<label id = "fenchang"></label>
                            	<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openTree()">承制班组</button>
								
								<span class="redColor">*</span>
                            </td>		
                        </tr>
                        <tr>
                            <th>备注:</th>
                            <td colspan='5'><textarea style='width: 95%; height: 100px;' name="remark" id="remark"></textarea></td>
                        </tr>
                    

                    </table>
                </form>
                <div class="btn_submit" align="center">
					<a href="productionPlanManagement.html" class="bgd_blue_two img_hand" id="saveAdd">保存</a>
                    <a href="productionPlanManagement.html" class="bgd_white_two img_hand" id="goBack">返回</a>
                </div>
            </div>

        </div>
        <div class="content_wrap" hidden="hidden">
				<div id="test1" class="demo-tree demo-tree-box"></div>
			</div>
        <!-- 版尾 -->
        <div class="ending">Copyright 2019-2020 磐基技术有限公司</div>
    </div>
	</body>
	<script src="../../js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/layui-add-tree/layui-add-tree.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/3rd/jquery-ui.js" type="text/javascript"></script>
	<script type="text/javascript">
		var h = document.documentElement.clientHeight;
		$(".wrap").css("height", h);
		
		// 日期控件
	// 日期控件
		$(function(){
	        $("#dateControl").datepicker({
	        	dateFormat : 'yy-mm-dd',
	            monthNamesShort:["January","February","March","April","May","June", "July","August","September","October","November","December"],
	 		 	changeYear:true,
	 		 	changeMonth:true,
	 		 	showOn:"button",
	 		 	buttonImage:"../../img/button/calendar.png",
	 		 	buttonImageOnly:false
	        });
	         $("#dateControl1").datepicker({
	        	dateFormat : 'yy-mm-dd',
	            monthNamesShort:["January","February","March","April","May","June", "July","August","September","October","November","December"],
	 		 	changeYear:true,
	 		 	changeMonth:true,
	 		 	showOn:"button",
	 		 	buttonImage:"../../img/button/calendar.png",
	 		 	buttonImageOnly:false
	        });
	     });
		
		
		
		// 获取每行 td 的兄弟节点
		$(".info_area td").hover(   
			function () {      
				$(this).parent().children().addClass("td_hover");   
			},    
			function () {      
				$(this).parent().children().removeClass("td_hover");   
			}
		);
		
		function openTree(){
			var that = this; 
			  //多窗口模式，层叠置顶
			  layer.open({
				type: 1
				,area: ['400px', '300px']
				,shade: 0
				,content: $('.content_wrap')
				
			  });
			   
		}
		
		
		layui.use(['tree', 'util'], function(){
		  var tree = layui.tree
		  ,layer = layui.layer
		  ,util = layui.util
		  
		  //模拟数据1
		  ,data1 = [{
			title: '吉林江机特种工业有限公司'
			,id: 1
			,children: [{
			  title: '七分厂'
			  ,id: 1000
			  ,children: [{
				title: '电装车间'
				,id: 10001
			  }]
			},{
			  title: '二分厂'
			  ,id: 1001
			},{
			  title: '信息管理部'
			  ,id: 1002
			}]
		  }];
		  
		 
		  
		 
		  //常规用法
		  tree.render({
			elem: '#test1' //默认是点击节点可进行收缩
			,data: data1
			,onlyIconControl: true  //是否仅允许节点左侧图标控制展开收缩
			,click: function(obj){
				//alert(JSON.stringify(obj.data.title));
				$("#fenchang").html(JSON.stringify(obj.data.title));
				layer.closeAll();
			}
		  });
		  
		 
		});
	</script>
</html>
